home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_12
/
1012076c
< prev
next >
Wrap
Text File
|
1992-10-11
|
462b
|
31 lines
/* token2.c: Parse input strings via strtokf() */
#include <stdio.h>
#include <ctype.h>
char *strtokf(char *, int (*)(char));
static int filter(char);
main()
{
char s[81];
while (gets(s))
{
char *tokp, *sp = s;
while ((tokp = strtokf(sp,filter)) != NULL)
{
puts(tokp);
sp = NULL;
}
}
return 0;
}
static int filter(char c)
{
return isalpha(c);
}